<style>
    .layui-form .layui-form-label {
        width: 200px;
        font-size: 16px;
    }
    .layui-form .layui-input-inline {
        width: 350px;
        font-size: 15px;
    }

</style>
<div class="layui-card" style="padding:10px;">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">User Info</li>
            <li>Edit Password</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form" action="" style="padding-top: 20px;">
                    <div class="layui-form-item">
                        <label class="layui-form-label">User Name：</label>
                        <div class="layui-form-mid">
                            {$manage_info['username']}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">Mobile：</label>
                        <div class="layui-form-mid">{$manage_info['mobile']}</div>
                    </div>
                </form>
            </div>
            <div class="layui-tab-item">
                <form class="layui-form" action="" style="padding-top: 20px;" id="editForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">Old Password：</label>
                        <div class="layui-input-inline">
                            <input type="password" name="password" required lay-verify="required_en" placeholder="Please enter the current password." autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">New Password：</label>
                        <div class="layui-input-inline">
                            <input type="password" name="newPwd" required lay-verify="required_en" placeholder="Please enter a new password." autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">Confirm Password：</label>
                        <div class="layui-input-inline">
                            <input type="password" name="rePwd" required lay-verify="required_en" placeholder="Confirm the new password." autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="button" class="layui-btn" lay-submit lay-filter="editPwd">Save</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['form','layer','element'],function(){
        var $ = layui.$, form = layui.form,element = layui.element, layer = layui.layer;
        form.render();
        //修改密码
        form.on('submit(editPwd)',function(data){
            JsPost("{:url('administrator/editPwd')}", data.field, function(res){
                if(res.status){
                    $("#editForm")[0].reset();
                }
                layer.msg(res.msg);
            })
        });
    });
</script>